package com.example.chenjun.myapplication.mvp.presenter;

import com.example.chenjun.myapplication.bean.CookBean;
import com.example.chenjun.myapplication.mvp.contract.LabelDetailContract;
import com.example.chenjun.myapplication.net.netcallback.BaseCallback;
import com.example.chenjun.myapplication.net.netcallback.ListCallback2;
import com.example.chenjun.myapplication.util.Logger;

import org.json.JSONObject;

import java.util.List;

public class LabelDetailPresenter extends LabelDetailContract.AbstractLabelDetailPresenter {
    @Override
    public void getLabelDetail(String labelId, int index, int size) {
        getModel().getCookLabelDetail(labelId, index, size, new ListCallback2<List<CookBean>>() {
            @Override
            public void onResponse(List<CookBean> list) {
                getView().getLabelDetailSuccess(list);
            }

            @Override
            public void onError(Exception e) {
                getView().getLabelDetailFailed(e);
            }
        });
    }
}
